﻿@{
    ViewBag.Title = "编辑用户";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutA.cshtml";
}
@section htmlhead{
      <link href="~/Content/assets/css/Layout/css/main.css" rel="stylesheet" />
        <link href="~/Content/assets/css/plugin/validator.css" rel="stylesheet" />
    }
@model LY.Entity.S_User
 <div class="container">
     <div id="forms" class="mt10">
        <div class="box">
          <div class="box_border">
            <div class="box_center">
              <form  id="frmEdit" method="post" action="@Url.Action("UserSave")" role="form" class="jqtransform">
                  <input id="hideId" name="Id" value="@Model.ID" type="hidden" />
               <table class="form_table pt15 pb15" style="width:100%;" border="0" >
                 <tr>
                  <td class="td_right">账号：</td>
                  <td> 
                      @if(Model.ID>0)
                      {
                          <input type="text" name="LoginName" value="@Model.LoginName" class="input-text lh30" readonly="true" size="40">  
                      }
                      else
                      {
                         <input type="text" name="LoginName" value="@Model.LoginName" class="input-text lh30" size="40">  
                      }
                  </td>
                 
                </tr>
                 <tr>
                  <td class="td_right">姓名：</td>
                  <td> 
                       <input type="text" name="UserName" id="UserName" value="@Model.UserName" class="input-text lh30" size="40">
                  </td>
                </tr>
                    <tr>
                  <td class="td_right">部门：</td>
                  <td> 
                       @Html.ResourceDropDownList("DeptID", "DepartMent",Model.DeptID, new {@class="select wh200"})
                  </td>
                </tr>
                    <tr>
                  <td class="td_right">电话：</td>
                  <td> 
                       <input type="text" name="Phone" id="Phone" value="@Model.Phone" class="input-text lh30" size="40">
                  </td>
                </tr>
                  <tr>
                  <td class="td_right">邮箱：</td>
                  <td> 
                       <input type="text" name="Email" id="Email" value="@Model.Email" class="input-text lh30" size="40">
                  </td>
                </tr>
                   <tr>
                       <td class="td_right">是否锁定：</td>
                       <td>
                           @Html.CheckBox("IsStop",Model.IsStop)
                       </td>
                   </tr>    
                       <tr>
                       <td class="td_right">图片上传：</td>
                       <td>
                           <div class="uploadImg">  
                            <img id="imgShow" src="~/assets/img/noimg.jpg" height="120" width="100" />
                            <input type="hidden" id="hidImgName" />  
                            <input type="button" id="btnUploadImg" value="上传" />  
                        </div>  

                       </td>
                   </tr>  
                   <tr>
                  <td class="td_right"></td>
                  <td>
                  </td>
                 </tr>
                 <tr>
                   <td class="td_right">&nbsp;</td>
                   <td class="">
                <input type="button" id="btnSave" name="button" class="btn btn82 btn_save2" value="保存"> 
                <input type="button" id="btnClose" name="button" class="btn btn82 btn_res" value="关闭"> 
                   </td>
                 </tr>
               </table>
                  <input type="hidden" id="hideDeptName" name="DeptName" />
               </form>
            </div>
          </div>
        </div>
     </div>
   </div> 


@section jssection{
    <script type="text/javascript"> 
    var util = {}; 
    var options = {
        uploadUrl: "@Url.Action("UploadImg")"
    }; 

   </script>
    <script src="~/Content/assets/plugins/validator/validator.js"></script>
    <script src="~/Content/assets/js/common.js"></script>
    <script src="~/Content/assets/layer/layer.min.js"></script>
    <script src="~/Content/assets/app/common/ajaxupload.js"></script>
    <script src="~/Content/assets/app/system/useredit.js"></script>

}
  